def outer(amount=0):
    def change(num):
        nonlocal amount
        amount = amount + num
        if num > 0:
            print(f"存款：+{num}，账户余额：{amount}")
        else:
            print(f"存款：-{num}，账户余额：{amount}")

    return change


fn = outer(100)
fn(100)
fn(-50)
